package com.ruoyi.crm.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.crm.mapper.PlanProjectMapper;
import com.ruoyi.crm.domain.PlanProject;
import com.ruoyi.crm.service.IPlanProjectService;

/**
 * 项目计划Service业务层处理
 *
 * @author ruoyi
 * @date 2021-08-30
 */
@Service
public class PlanProjectServiceImpl implements IPlanProjectService
{
    @Autowired
    private PlanProjectMapper planProjectMapper;

    /**
     * 查询项目计划
     *
     * @param id 项目计划主键
     * @return 项目计划
     */
    @Override
    public PlanProject selectPlanProjectById(String id)
    {
        return planProjectMapper.selectPlanProjectById(id);
    }

    /**
     * 查询项目计划列表
     *
     * @param planProject 项目计划
     * @return 项目计划
     */
    @Override
    public List<PlanProject> selectPlanProjectList(PlanProject planProject)
    {
        return planProjectMapper.selectPlanProjectList(planProject);
    }

    /**
     * 新增项目计划
     *
     * @param planProject 项目计划
     * @return 结果
     */
    @Override
    public int insertPlanProject(PlanProject planProject)
    {
        return planProjectMapper.insertPlanProject(planProject);
    }

    /**
     * 修改项目计划
     *
     * @param planProject 项目计划
     * @return 结果
     */
    @Override
    public int updatePlanProject(PlanProject planProject)
    {
        planProject.setUpdateTime(DateUtils.getNowDate());
        return planProjectMapper.updatePlanProject(planProject);
    }

    /**
     * 批量删除项目计划
     *
     * @param ids 需要删除的项目计划主键
     * @return 结果
     */
    @Override
    public int deletePlanProjectByIds(String[] ids)
    {
        return planProjectMapper.deletePlanProjectByIds(ids);
    }

    /**
     * 删除项目计划信息
     *
     * @param id 项目计划主键
     * @return 结果
     */
    @Override
    public int deletePlanProjectById(String id)
    {
        return planProjectMapper.deletePlanProjectById(id);
    }
}